package com.baor.controller;

import com.baor.domain.LeaveVo;
import com.baor.service.ApprovalService;
import com.baor.utils.AjaxResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping(value = "/approval")
public class ApprovalController {

    @Autowired
    private ApprovalService approvalService;

    @RequestMapping("empApprovalList")
    public AjaxResult<?> empApprovalList(@RequestBody Map<String, Object> map){
        return this.approvalService.empApprovalList(map);
    }

    @RequestMapping("empApproval")
    public AjaxResult<?> empApproval(@RequestBody Map<String, Object> map){
        return this.approvalService.empApproval(map);
    }

    @RequestMapping("adjustApprovalList")
    public AjaxResult<?> adjustApprovalList(@RequestBody Map<String, Object> map){
        return this.approvalService.adjustApprovalList(map);
    }

    @RequestMapping("adjustApproval")
    public AjaxResult<?> adjustApproval(@RequestBody Map<String, Object> map){
        return this.approvalService.adjustApproval(map);
    }

    @RequestMapping("changeApprovalList")
    public AjaxResult<?> changeApprovalList(@RequestBody Map<String, Object> map){
        return this.approvalService.changeApprovalList(map);
    }

    @RequestMapping("changeApproval")
    public AjaxResult<?> changeApproval(@RequestBody Map<String, Object> map){
        return this.approvalService.changeApproval(map);
    }
}
